package com.tuo51.foudation.constant;

import lombok.Setter;

/**
 * *******************************
 * Created by Ron.
 * form com.tuo51
 * on 2017/8/17
 * *******************************
 */
public class EvaluatingConstant {

    public static final Long PLUS_DAY_FOR_HEALTH_INFO = 7L;

    public enum EvaluatingCEType{
        BEGIN_ACTIVITY(1, "起始活动"),
        CALL_HELLO(2, "点名问好"),
        SAT_LEARN_ONE(3, "SAT学习（1）"),
        MUSIC(4, "音乐游戏"),
        SAY_LEARN_TWO(5, "SAT学习（2）"),
        STORY_TIME(6, "故事时光"),
        END_LINK(7, "结束环节"),
        ;

        @Setter
        private int code;

        @Setter
        private String value;

        EvaluatingCEType(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public EvaluatingCEType get(int code){
            for (EvaluatingCEType type : values()) {
                if (type.codeOf()==code)
                    return type;
            }
            return null;
        }

        public EvaluatingCEType getValueOf(String value){
            for (EvaluatingCEType type : values()) {
                if (value.contains(type.valueOf()))
                    return type;
            }
            return null;
        }
    }


    public enum EvaluatingType{
        MONTH(1, "月评"),
        COURSE_BEFORE(2, "课前");

        @Setter
        private int code;

        @Setter
        private String value;

        EvaluatingType(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public EvaluatingType get(int code){
            for (EvaluatingType type : values()) {
                if (type.codeOf()==code)
                    return type;
            }
            return null;
        }

        public EvaluatingType getValueOf(String value){
            for (EvaluatingType type : values()) {
                if (type.valueOf().equals(value))
                    return type;
            }
            return null;
        }
    }

    public enum OptionType{
        ATTENTION(1, "注意力"),
        LOGIC(2, "逻辑思维"),
        EMOTION(3, "情感与社会性"),
        BIG_BODY_ACTION(4, "大肢体动作"),
        CAREFUL_ACTION(5, "精细动作"),
        ACKNOWLEDGE_PROGRESS(6, "认知发展"),
        LANGUAGE_PROGRESS(7, "语言发展"),
        ;

        @Setter
        private int code;

        @Setter
        private String value;

        OptionType(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public OptionType get(int code){
            for (OptionType type : values()) {
                if (type.codeOf()==code)
                    return type;
            }
            return null;
        }

        public OptionType getValueOf(String value){
            for (OptionType type : values()) {
                if (type.valueOf().equals(value))
                    return type;
            }
            return null;
        }
    }

    public enum EvaluateRecordStatus{
        NON_ASSESS(1, "未评估"),
        ASSESS(2, "已归档");

        @Setter
        private int code;

        @Setter
        private String value;

        EvaluateRecordStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public EvaluateRecordStatus get(int code){
            for (EvaluateRecordStatus status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }

        public EvaluateRecordStatus getValueOf(String value){
            for (EvaluateRecordStatus  status: values()) {
                if (status.valueOf().equals(value))
                    return status;
            }
            return null;
        }
    }

    public enum CBSRecordStatus{
        NON_ASSESS(1, "未评估"),
        ASSESS(2, "已评估"),
        BIND(3, "已绑定"),
        FEEDBACK(4, "已反馈"),
        CONFIRMED(5, "已确认");

        @Setter
        private int code;

        @Setter
        private String value;

        CBSRecordStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public CBSRecordStatus get(int code){
            for (CBSRecordStatus status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }

        public CBSRecordStatus getValueOf(String value){
            for (CBSRecordStatus  status: values()) {
                if (status.valueOf().equals(value))
                    return status;
            }
            return null;
        }
    }

    public enum MSRecordStatus{
        NON_ASSESS(1, "未评估"),
        ASSESS(2, "已评估"),
        FEEDBACK(3, "已反馈"),
        CONFIRMED(4, "已确认");

        @Setter
        private int code;

        @Setter
        private String value;

        MSRecordStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public MSRecordStatus get(int code){
            for (MSRecordStatus status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }

        public MSRecordStatus getValueOf(String value){
            for (MSRecordStatus status: values()) {
                if (status.valueOf().equals(value))
                    return status;
            }
            return null;
        }
    }

    public enum EarlyMRecordStatus{
        NON_ASSESS(1, "未评估"),
        ASSESS(2, "已评估"),
        FEEDBACK(3, "已反馈"),
        CONFIRMED(4, "已确认");

        @Setter
        private int code;

        @Setter
        private String value;

        EarlyMRecordStatus(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public EarlyMRecordStatus get(int code){
            for (EarlyMRecordStatus status : values()) {
                if (status.codeOf()==code)
                    return status;
            }
            return null;
        }

        public EarlyMRecordStatus getValueOf(String value){
            for (EarlyMRecordStatus status: values()) {
                if (status.valueOf().equals(value))
                    return status;
            }
            return null;
        }
    }


    public enum EvaluatingCBRecordCategory{
        COURSE_BEFORE(1, "课前"),
        MONTH(2, "月评");

        @Setter
        private int code;

        @Setter
        private String value;

        EvaluatingCBRecordCategory(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public EvaluatingCBRecordCategory get(int code){
            for (EvaluatingCBRecordCategory category : values()) {
                if (category.codeOf()==code)
                    return category;
            }
            return null;
        }

        public EvaluatingCBRecordCategory getValueOf(String value){
            for (EvaluatingCBRecordCategory category : values()) {
                if (category.valueOf().equals(value))
                    return category;
            }
            return null;
        }
    }

    public enum EvaluatingCEAbility{
        ZHU_YI_LI(1, "注意力"),
        SHI_JIAN_REN_ZHI(2, "时间认知"),
        ZI_WO_YI_SHI(3, "自我意识"),
        LI_JIE_YU_BIAO_DA(4, "理解与表达"),
        YUE_DU_NENG_LI(5, "阅读能力"),
        DONG_ZUO_MO_FANG_NENG_LI(6, "动作模仿能力"),
        QING_XU_ZHUANG_TAI(7, "情绪状态"),
        HU_DONG_SHUI_PING(8, "互动水平"),
        HUAN_JING_SHI_YING_NENG_LI(9, "环境适应能力"),
        LI_MAO_BIAO_DA(10, "礼貌表达"),
        ;

        @Setter
        private int code;

        @Setter
        private String value;

        EvaluatingCEAbility(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public EvaluatingCEAbility get(int code){
            for (EvaluatingCEAbility ability : values()) {
                if (ability.codeOf()==code)
                    return ability;
            }
            return null;
        }

        public EvaluatingCEAbility getValueOf(String value){
            for (EvaluatingCEAbility ability: values()) {
                if (ability.valueOf().equals(value))
                    return ability;
            }
            return null;
        }
    }


    public enum EvaluateCategory{
        NO_ORDER_EVALUATE(1, "签约前初评"),
        ORDER_EVALUATE(2, "签约后测评"),
        ;

        @Setter
        private int code;

        @Setter
        private String value;

        EvaluateCategory(int code, String value){
            this.code = code;
            this.value = value;
        }

        public int codeOf(){
            return code;
        }

        public String valueOf(){
            return value;
        }

        public EvaluateCategory get(int code){
            for (EvaluateCategory category : values()) {
                if (category.codeOf()==code)
                    return category;
            }
            return null;
        }

        public EvaluateCategory getValueOf(String value){
            for (EvaluateCategory category: values()) {
                if (category.valueOf().equals(value))
                    return category;
            }
            return null;
        }
    }
}
